import ajax from './index'

// 获取订单列表
export const getOrderList = (params, header) => ajax.post('trade/orderList', params, {
  header
})

// 创建订单
export const createOrder = (params) => ajax.post(`trade/createOrder`, params);

/**
 * 取消订单
 */
export const cancelOrder = (params) => ajax.post('trade/cancel', params)

/**
 * 请求订单退款信息
 */
export const getRefundList = (params) => ajax.post('trade/refundApplyList', params)

/**
 * 请求订单入园凭证/司导信息/导领信息/用车信息
 */
export const getVoucherInfo = (params) => ajax.post('trade/voucherInfo', params)

/**
 * 订单详情
 */
export const getOrderDetail = (params) => ajax.post('trade/orderDetail', params)

//待取消记录
export const getPreCancelInfo = (params) => ajax.post(`trade/preCancelInfo`, params)

//新增定制游
export const createCustomOrder = (params) => ajax.post(`custom/add`, params)


//获取定制游订单列表
export const getCustomOrders = (params, header) => ajax.post(`custom/list`, params, {header})

//获取定制游订单详情
export const getCustomOrderDetail = (params) => ajax.post(`custom/detail`, params)


//取消定制游订单
export const canelCustomOrder = (params) => ajax.post(`custom/cancel`, params)
